package com.youlu.campus.admin.task;

import com.youlu.campus.admin.zm.task.RedisDelayQueue;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * @author : [dengbo]
 * @className : RedisDelayQueueRun
 * @description : [redis 队列启动类]
 * @createTime : [2022/12/2 20:26]
 */
@Slf4j
@Component
public class RedisDelayQueueTask {

    @Autowired
    private RedisDelayQueue redisDelayQueue;

    @Scheduled(initialDelay = 1000, fixedDelay = 2000)
    public void listenDelayLoop() {
        redisDelayQueue.listenDelayLoop();
    }
}
